package com.bjc.gmall.service.impl;


import com.bjc.gmall.bean.UserAddress;
import com.bjc.gmall.service.OrderService;
import com.bjc.gmall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: dubbo-study
 * @description:
 * @author: bjc
 * @create: 2020-07-19 12:20
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    UserService userService;

    @Override
    public List<UserAddress> initOrder(String userId) {
        //1.查询用户地址
        System.out.println("用户id："+userId);
        List<UserAddress> addressList = userService.getUserAddressList(userId);
        for (UserAddress userAddress: addressList) {
            System.out.println(userAddress.getUserAddress());
        }
        return addressList;
    }
}
